<template>
  <button @click="f1">请求数据</button>
</template>

<script setup>
import axios from 'axios';

function f1(){
  axios({
    url:'/a.json'
  })
  .then(r=>{
    console.log(r.data);
  })
}
</script>

<style lang="scss" scoped>

</style>